home *** CD-ROM | disk | FTP | other *** search
- global MyFile, myPath, gSliderKnopf, gLinie, gPixelProZeile, gSliderMin, gSliderMax, gSliderBereich, gSliderPos, gZeilenhΓÇíhe
-
- on startMovie
- puppetTempo(30)
- set the exitLock to 1
- set the keyDownScript to "keyCheck"
- end
-
- on keyCheck
- if the keyCode = 53 then
- go(40)
- end if
- end
-
- on prepareMovie
- clearGlobals()
- set the floatPrecision to 4
- gSliderKnopf = 7
- gLinie = 6
- end
-
- on initSlider
- gSliderMin = sprite(gLinie).top
- gSliderMax = sprite(gLinie).bottom
- gSliderBereich = float(gSliderMax - gSliderMin)
- feldHΓÇíhe = float(member("text").height - member("text").pageHeight + 17)
- gPixelProZeile = gSliderBereich / feldHΓÇíhe
- gLineHeight = member("text").lineHeight
- sprite(gSliderKnopf).locV = gSliderMin
- member("text").scrollTop = 0
- updateStage()
- end
-
- on updateSlider
- gSliderPos = member("text").scrollTop
- newV = gSliderMin + integer(gPixelProZeile * gSliderPos)
- sprite(gSliderKnopf).locV = newV
- end
-
- on updateText
- currV = sprite(gSliderKnopf).locV
- newPos = integer((currV - gSliderMin) / gPixelProZeile)
- newPos = newPos - (newPos mod member("text").lineHeight)
- minVisible = member("text").height - gZeilenhΓÇíhe
- if newPos > minVisible then
- newPos = minVisible
- end if
- member("text").scrollTop = newPos
- end
-